package com.ygq.Impl;


import com.ygq.purgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import mapper.clearMapper;

@Service
@Transactional
public class purgeServiceImpl implements purgeService {

    @Autowired
    private clearMapper clearMapper;

    // 删除全部学生数据
    public void clear() {
        // 1. 先删除表数据

        // 1.1 classes 表
        clearMapper.clearClasses();

        // 1.2 logo 签到表
        clearMapper.clearLogo();

        // 1.3 ppt 表
        clearMapper.clearPPT();

        // 1.4 student 表
        clearMapper.clearStudent();

        // 1.5 work 表
        clearMapper.clearWork();

        // 1.6 work_answer_choose
        clearMapper.clearWorkAnswerChoose();

        // 1.7 work_answer_encode
        clearMapper.clearWorkAnswerEncode();

        // 1.8 work_answer_fill
        clearMapper.clearWorkAnswerFill();

        // 1.9 work_answer_judge
        clearMapper.clearWorkAnswerJudge();

        // 1.10 work_choose
        clearMapper.clearWorkChoose();

        // 1.11 work_class
        clearMapper.clearWorkClass();

        // 1.12 work_encode
        clearMapper.clearWorkEncode();

        // 1.13 work_file_upload
        clearMapper.clearWorkFileUpload();

        // 1.14 work_fill
        clearMapper.clearWorkFill();

        // 1.15 work_fill_option
        clearMapper.clearWorkFillOption();

        // 1.16 work_judge
        clearMapper.clearWorkJudge();

        // 1.17 work_score
        clearMapper.clearWorkScore();

        // 1.18 work_student_state;
        clearMapper.clearWorkStudentState();

        // 1.19 work_test_two_data
        clearMapper.clearWorkTestTwoData();
    }
}
